package main

import (
	"fmt"
)

func main() {
	graph := [][]int{{1, 1, 0}, {1, 1, 0}, {0, 0, 1}}
	initial := []int{0, 1}

	graph = [][]int{
		{1, 0, 0, 0, 0, 0, 0, 0, 0},
		{0, 1, 0, 0, 0, 0, 0, 0, 0},
		{0, 0, 1, 0, 1, 0, 1, 0, 0},
		{0, 0, 0, 1, 0, 0, 0, 0, 0},
		{0, 0, 1, 0, 1, 0, 0, 0, 0},
		{0, 0, 0, 0, 0, 1, 0, 0, 0},
		{0, 0, 1, 0, 0, 0, 1, 0, 0},
		{0, 0, 0, 0, 0, 0, 0, 1, 0},
		{0, 0, 0, 0, 0, 0, 0, 0, 1}}
	initial = []int{6, 0, 4}

	node := minMalwareSpread(graph, initial)
	fmt.Println()
	fmt.Println(node)
}

func removeNode(graph [][]int, node int) {
	graph[node][node] = 0
	if node-1 > 0 {
		graph[node-1][node] = 0
		graph[node][node-1] = 0
	}
	if node+1 <= len(graph)-1 {
		graph[node+1][node] = 0
		graph[node][node+1] = 0
	}
}

func bfs(graph [][]int, node int) {

}

func minMalwareSpread(graph [][]int, initial []int) int {
	for k := 0; k < len(initial); k++ {
		node := initial[k]
		bfs(graph, node)
	}
	// for i := 0; i < len(graph); i++ {
	// 	for j := 0; j < len(graph[0]); j++ {
	// 		if graph[i][j] == 1 {
	// 			fmt.Printf("%v -> %v", i, j)
	// 			graph[i][j] = 0
	// 			graph[j][i] = 0
	// 			fmt.Println()
	// 		}
	// 	}
	// }
	return 0
}
